<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.12"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>emp-toolkit: /Users/wangxiao/git/emp-toolkit/emp-tool/gc/halfgate_gen.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="logo-full-doxygen.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">emp-toolkit
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.12 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('halfgate__gen_8h_source.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">halfgate_gen.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="halfgate__gen_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#ifndef HALFGATE_GEN_H__</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="preprocessor">#define HALFGATE_GEN_H__</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="io__channel_8h.html">io_channel.h</a>&quot;</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="net__io__channel_8h.html">net_io_channel.h</a>&quot;</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="file__io__channel_8h.html">file_io_channel.h</a>&quot;</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="preprocessor">#include &quot;block.h&quot;</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="utils_8h.html">utils.h</a>&quot;</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="prp_8h.html">prp.h</a>&quot;</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="hash_8h.html">hash.h</a>&quot;</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="garble__gate__halfgates_8h.html">garble/garble_gate_halfgates.h</a>&quot;</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="preprocessor">#include &lt;iostream&gt;</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;</div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> T, RTCktOpt rt&gt;</div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="keywordtype">bool</span> <a class="code" href="halfgate__gen_8h.html#a661cb24690d1d5e7626a9d7373e2ea52">halfgate_gen_is_public</a>(<a class="code" href="class_garble_circuit.html">GarbleCircuit</a>* gc, <span class="keyword">const</span> <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> &amp; b, <span class="keywordtype">int</span> <a class="code" href="input-check-malicious_8cpp.html#aefdd5aa9f02e7cb8d21ea22b0e6b03df">party</a>);</div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;</div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> T, RTCktOpt rt&gt;</div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> <a class="code" href="halfgate__gen_8h.html#ae2ae2f78c5d648c19a7ead8c9eb3440c">halfgate_gen_public_label</a>(<a class="code" href="class_garble_circuit.html">GarbleCircuit</a>* gc, <span class="keywordtype">bool</span> b);</div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;</div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> T, RTCktOpt rt&gt;</div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> <a class="code" href="halfgate__gen_8h.html#a3b19931586747a65d007ff4877157f26">halfgate_gen_and</a>(<a class="code" href="class_garble_circuit.html">GarbleCircuit</a>* gc, <span class="keyword">const</span> <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a>&amp;a, <span class="keyword">const</span> <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a>&amp;b);</div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;</div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> T, RTCktOpt rt&gt;</div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> <a class="code" href="halfgate__gen_8h.html#acda380ac711489ae48d276513088968c">halfgate_gen_xor</a>(<a class="code" href="class_garble_circuit.html">GarbleCircuit</a>*gc, <span class="keyword">const</span> <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a>&amp;a, <span class="keyword">const</span> <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a>&amp;b);</div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;</div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> T, RTCktOpt rt&gt;</div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> <a class="code" href="halfgate__gen_8h.html#aa04db20be652be74ba88238a7321e56e">halfgate_gen_not</a>(<a class="code" href="class_garble_circuit.html">GarbleCircuit</a>*gc, <span class="keyword">const</span> <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a>&amp;a);</div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;</div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> T, RTCktOpt rt = on&gt;</div><div class="line"><a name="l00029"></a><span class="lineno"><a class="line" href="class_half_gate_gen.html">   29</a></span>&#160;<span class="keyword">class </span><a class="code" href="class_half_gate_gen.html">HalfGateGen</a>:<span class="keyword">public</span> <a class="code" href="class_garble_circuit.html">GarbleCircuit</a>{ <span class="keyword">public</span>:</div><div class="line"><a name="l00030"></a><span class="lineno"><a class="line" href="class_half_gate_gen.html#a4461a70b2d3763dc46a1e59f5316f6cf">   30</a></span>&#160;    <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> <a class="code" href="class_half_gate_gen.html#a4461a70b2d3763dc46a1e59f5316f6cf">delta</a>;</div><div class="line"><a name="l00031"></a><span class="lineno"><a class="line" href="class_half_gate_gen.html#a4dd6b3c5b9ccc71f9b92eeba484a66dc">   31</a></span>&#160;    <a class="code" href="class_p_r_p.html">PRP</a> <a class="code" href="class_half_gate_gen.html#a4dd6b3c5b9ccc71f9b92eeba484a66dc">prp</a>;</div><div class="line"><a name="l00032"></a><span class="lineno"><a class="line" href="class_half_gate_gen.html#a3efbfe69bfecb0a83b27fb1a761f6ca3">   32</a></span>&#160;    <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> <a class="code" href="class_half_gate_gen.html#a3efbfe69bfecb0a83b27fb1a761f6ca3">seed</a>;</div><div class="line"><a name="l00033"></a><span class="lineno"><a class="line" href="class_half_gate_gen.html#a463724b03a248df355c58acd0c8e3dca">   33</a></span>&#160;    T * <a class="code" href="class_half_gate_gen.html#a463724b03a248df355c58acd0c8e3dca">io</a>;</div><div class="line"><a name="l00034"></a><span class="lineno"><a class="line" href="class_half_gate_gen.html#af60f59213128225ff61b320b76eb35ef">   34</a></span>&#160;    <a class="code" href="class_hash.html">Hash</a> <a class="code" href="class_half_gate_gen.html#af60f59213128225ff61b320b76eb35ef">hash</a>;</div><div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="class_half_gate_gen.html#a4125dfe4791aa8d529844c2b2da2df91">   35</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="class_half_gate_gen.html#a4125dfe4791aa8d529844c2b2da2df91">with_file_io</a> = <span class="keyword">false</span>;</div><div class="line"><a name="l00036"></a><span class="lineno"><a class="line" href="class_half_gate_gen.html#ae15a690cbd5d499e56c6a3ec4b97e8c9">   36</a></span>&#160;    <a class="code" href="class_half_gate_gen.html#ae15a690cbd5d499e56c6a3ec4b97e8c9">HalfGateGen</a>(T * io) :io(io) {</div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;        <a class="code" href="class_p_r_g.html">PRG</a> tmp;</div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;        tmp.<a class="code" href="class_p_r_g.html#a822a2e39f1d2629b881ce9b3b8d66bf9">random_block</a>(&amp;seed, 1);</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;        <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> a;</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;        tmp.<a class="code" href="class_p_r_g.html#a822a2e39f1d2629b881ce9b3b8d66bf9">random_block</a>(&amp;a, 1);</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;        <a class="code" href="class_half_gate_gen.html#a5cd42ef5182448a5069a3918ff05196f">set_delta</a>(a);</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;        <a class="code" href="class_garble_circuit.html#a46e815c9fb7a86bd4f2f92480779a13b">is_public_ptr</a> = &amp;halfgate_gen_is_public&lt;T, rt&gt;;</div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;        <a class="code" href="class_garble_circuit.html#a6615b1040a189cff8e434b9e0aace85b">public_label_ptr</a> = &amp;halfgate_gen_public_label&lt;T, rt&gt;;</div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;        <a class="code" href="class_garble_circuit.html#afccc6540c2627b73b87d6c5f84b88f1e">gc_and_ptr</a> = &amp;halfgate_gen_and&lt;T, rt&gt;;</div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;        <a class="code" href="class_garble_circuit.html#afa9ba1e3231ce457c27271ab0f851014">gc_xor_ptr</a> = &amp;halfgate_gen_xor&lt;T, rt&gt;;</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;        <a class="code" href="class_garble_circuit.html#a21e46d460e571ba333ad682c92c4bd57">gc_not_ptr</a> = &amp;halfgate_gen_not&lt;T, rt&gt;;</div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;    }</div><div class="line"><a name="l00048"></a><span class="lineno"><a class="line" href="class_half_gate_gen.html#adca6116d57d56939511f22bb810d512f">   48</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="class_half_gate_gen.html#adca6116d57d56939511f22bb810d512f">is_public_impl</a>(<span class="keyword">const</span> <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> &amp; b, <span class="keywordtype">int</span> <a class="code" href="input-check-malicious_8cpp.html#aefdd5aa9f02e7cb8d21ea22b0e6b03df">party</a>) {</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="utils_2block_8h.html#a5d6a5bd7b77a4610c6158487adbe5ba4">isZero</a>(&amp;b) or <a class="code" href="utils_2block_8h.html#a01d7fb04c12a2a0e2e30c31e0c61d44d">isOne</a>(&amp;b);</div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;    }</div><div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="class_half_gate_gen.html#a5cd42ef5182448a5069a3918ff05196f">   51</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_half_gate_gen.html#a5cd42ef5182448a5069a3918ff05196f">set_delta</a>(<span class="keyword">const</span> <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> &amp;_delta) {</div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;        this-&gt;delta = <a class="code" href="class_garble_circuit.html#a86e55a9aa718d272c365dfd649fa97e1">make_delta</a>(_delta);</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;    }</div><div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="class_half_gate_gen.html#a304b0a60a2adc9ea36ea34c45eb1fac9">   54</a></span>&#160;    <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> <a class="code" href="class_half_gate_gen.html#a304b0a60a2adc9ea36ea34c45eb1fac9">public_label_impl</a>(<span class="keywordtype">bool</span> b) {</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;        <span class="keywordflow">return</span> b? <a class="code" href="utils_2block_8h.html#a82cb0a8d42708a807a061856813ac9f6">one_block</a>() : <a class="code" href="utils_2block_8h.html#af2ad8a9f0015464df6574a13e598bdb8">zero_block</a>();</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;    }</div><div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="class_half_gate_gen.html#a844d111523a5a413279f08fe508b0a73">   57</a></span>&#160;    <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> <a class="code" href="class_half_gate_gen.html#a844d111523a5a413279f08fe508b0a73">gen_and</a>(<span class="keyword">const</span> <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a>&amp; a, <span class="keyword">const</span> <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a>&amp; b) {</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;        <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> out[2], table[2];</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;        <span class="keywordflow">if</span> (<a class="code" href="utils_2block_8h.html#a5d6a5bd7b77a4610c6158487adbe5ba4">isZero</a>(&amp;a) or <a class="code" href="utils_2block_8h.html#a5d6a5bd7b77a4610c6158487adbe5ba4">isZero</a>(&amp;b)) {</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;            <span class="keywordflow">return</span> <a class="code" href="utils_2block_8h.html#af2ad8a9f0015464df6574a13e598bdb8">zero_block</a>();</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;        } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="utils_2block_8h.html#a01d7fb04c12a2a0e2e30c31e0c61d44d">isOne</a>(&amp;a)) {</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;            <span class="keywordflow">return</span> b;</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;        } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="utils_2block_8h.html#a01d7fb04c12a2a0e2e30c31e0c61d44d">isOne</a>(&amp;b)){</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;            <span class="keywordflow">return</span> a;</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;        } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;            garble_gate_garble_halfgates(<a class="code" href="garble_8h.html#acde351ee0c4a231557cb9d0b8b7a2641aa6a6bdaab4cbde5d9524a39cac9f3bfa">GARBLE_GATE_AND</a>, a, <a class="code" href="utils_2block_8h.html#a939b7dd0e7479964d6fe6984b90dd5ce">xorBlocks</a>(a,delta), b, <a class="code" href="utils_2block_8h.html#a939b7dd0e7479964d6fe6984b90dd5ce">xorBlocks</a>(b,delta), </div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;                    &amp;out[0], &amp;out[1], delta, table, <a class="code" href="class_garble_circuit.html#a8f6b42bac3b5ce931d1d3eacb7db9d88">gid</a>++, prp.<a class="code" href="class_p_r_p.html#abbb7cb3f37a26e14c411c83d9ad4cc92">aes</a>);</div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;            io-&gt;send_block(table, 2);</div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;            <span class="keywordflow">return</span> out[0];</div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;        }</div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;    }</div><div class="line"><a name="l00072"></a><span class="lineno"><a class="line" href="class_half_gate_gen.html#a1f33c3c22bc8ef11077a8d2c04820973">   72</a></span>&#160;    <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> <a class="code" href="class_half_gate_gen.html#a1f33c3c22bc8ef11077a8d2c04820973">gen_xor</a>(<span class="keyword">const</span> <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a>&amp;a, <span class="keyword">const</span> <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a>&amp; b) {</div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;        <span class="keywordflow">if</span>(<a class="code" href="utils_2block_8h.html#a01d7fb04c12a2a0e2e30c31e0c61d44d">isOne</a>(&amp;a))</div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;            <span class="keywordflow">return</span> <a class="code" href="class_half_gate_gen.html#ab318af2fe80af274c87ad15d510ebdfe">gen_not</a>(b);</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;        <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="utils_2block_8h.html#a01d7fb04c12a2a0e2e30c31e0c61d44d">isOne</a>(&amp;b))</div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;            <span class="keywordflow">return</span> <a class="code" href="class_half_gate_gen.html#ab318af2fe80af274c87ad15d510ebdfe">gen_not</a>(a);</div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;        <span class="keywordflow">else</span></div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;            <span class="keywordflow">return</span> <a class="code" href="utils_2block_8h.html#a939b7dd0e7479964d6fe6984b90dd5ce">xorBlocks</a>(a, b);</div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;    }</div><div class="line"><a name="l00080"></a><span class="lineno"><a class="line" href="class_half_gate_gen.html#ab318af2fe80af274c87ad15d510ebdfe">   80</a></span>&#160;    <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> <a class="code" href="class_half_gate_gen.html#ab318af2fe80af274c87ad15d510ebdfe">gen_not</a>(<span class="keyword">const</span> <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a>&amp;a) {</div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;        <span class="keywordflow">if</span> (<a class="code" href="utils_2block_8h.html#a5d6a5bd7b77a4610c6158487adbe5ba4">isZero</a>(&amp;a))</div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;            <span class="keywordflow">return</span> <a class="code" href="utils_2block_8h.html#a82cb0a8d42708a807a061856813ac9f6">one_block</a>();</div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;        <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="utils_2block_8h.html#a01d7fb04c12a2a0e2e30c31e0c61d44d">isOne</a>(&amp;a))</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;            <span class="keywordflow">return</span> <a class="code" href="utils_2block_8h.html#af2ad8a9f0015464df6574a13e598bdb8">zero_block</a>();</div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;        <span class="keywordflow">else</span></div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;            <span class="keywordflow">return</span> <a class="code" href="utils_2block_8h.html#a939b7dd0e7479964d6fe6984b90dd5ce">xorBlocks</a>(a,delta);</div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;    }</div><div class="line"><a name="l00088"></a><span class="lineno"><a class="line" href="class_half_gate_gen.html#a51a319ae4aad029e54743856abaf8856">   88</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_half_gate_gen.html#a51a319ae4aad029e54743856abaf8856">generic_to_xor</a>(<span class="keyword">const</span> <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a>* new_b0,<span class="keyword">const</span> <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> * b0, <span class="keyword">const</span> <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> * b1, <span class="keywordtype">int</span> length) {</div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;        <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> h[4];</div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;        <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i = 0; i &lt; length; ++i) {</div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;            h[0] = prp.<a class="code" href="class_p_r_p.html#a27497c4db9526ca6a8df4fd4db9782d0">H</a>(b0[i], 2*i);</div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;            h[1] = prp.<a class="code" href="class_p_r_p.html#a27497c4db9526ca6a8df4fd4db9782d0">H</a>(b0[i], 2*i+1);</div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;            h[2] = prp.<a class="code" href="class_p_r_p.html#a27497c4db9526ca6a8df4fd4db9782d0">H</a>(b1[i], 2*i);</div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;            h[3] = prp.<a class="code" href="class_p_r_p.html#a27497c4db9526ca6a8df4fd4db9782d0">H</a>(b1[i], 2*i+1);</div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;</div><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;            h[1] = <a class="code" href="utils_2block_8h.html#a939b7dd0e7479964d6fe6984b90dd5ce">xorBlocks</a>(new_b0[i], h[1]);  </div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;            h[3] = <a class="code" href="utils_2block_8h.html#a939b7dd0e7479964d6fe6984b90dd5ce">xorBlocks</a>(new_b0[i], h[3]);  </div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;            h[3] = <a class="code" href="utils_2block_8h.html#a939b7dd0e7479964d6fe6984b90dd5ce">xorBlocks</a>(delta, h[3]);</div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;            io-&gt;send_block(h, 4);</div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;        }</div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;    }</div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;};</div><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l00104"></a><span class="lineno"><a class="line" href="class_half_gate_gen_3_01_t_00_01_r_t_ckt_opt_1_1off_01_4.html">  104</a></span>&#160;<span class="keyword">class </span><a class="code" href="class_half_gate_gen.html">HalfGateGen</a>&lt;T,<a class="code" href="garble__circuit_8h.html#ae7d6f2e6bfde733807facd102cf377fe">RTCktOpt</a>::<a class="code" href="garble__circuit_8h.html#ae7d6f2e6bfde733807facd102cf377fea53ace14c115e45153a1c9105accceb4c">off</a>&gt;:<span class="keyword">public</span> <a class="code" href="class_garble_circuit.html">GarbleCircuit</a>{ <span class="keyword">public</span>:</div><div class="line"><a name="l00105"></a><span class="lineno"><a class="line" href="class_half_gate_gen_3_01_t_00_01_r_t_ckt_opt_1_1off_01_4.html#aa4f32a1fbbe98f879630d094d414259b">  105</a></span>&#160;    <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> <a class="code" href="class_half_gate_gen_3_01_t_00_01_r_t_ckt_opt_1_1off_01_4.html#aa4f32a1fbbe98f879630d094d414259b">delta</a>;</div><div class="line"><a name="l00106"></a><span class="lineno"><a class="line" href="class_half_gate_gen_3_01_t_00_01_r_t_ckt_opt_1_1off_01_4.html#a39b79c33fd571e8b68f88d422dcdd64e">  106</a></span>&#160;    <a class="code" href="class_p_r_p.html">PRP</a> <a class="code" href="class_half_gate_gen_3_01_t_00_01_r_t_ckt_opt_1_1off_01_4.html#a39b79c33fd571e8b68f88d422dcdd64e">prp</a>;</div><div class="line"><a name="l00107"></a><span class="lineno"><a class="line" href="class_half_gate_gen_3_01_t_00_01_r_t_ckt_opt_1_1off_01_4.html#a2630761bc053b3f9ad04eefb122c25fb">  107</a></span>&#160;    <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> <a class="code" href="class_half_gate_gen_3_01_t_00_01_r_t_ckt_opt_1_1off_01_4.html#a2630761bc053b3f9ad04eefb122c25fb">seed</a>;</div><div class="line"><a name="l00108"></a><span class="lineno"><a class="line" href="class_half_gate_gen_3_01_t_00_01_r_t_ckt_opt_1_1off_01_4.html#a05602f4b1690ebdcd3337f4c516376d4">  108</a></span>&#160;    T * <a class="code" href="class_half_gate_gen_3_01_t_00_01_r_t_ckt_opt_1_1off_01_4.html#a05602f4b1690ebdcd3337f4c516376d4">io</a>;</div><div class="line"><a name="l00109"></a><span class="lineno"><a class="line" href="class_half_gate_gen_3_01_t_00_01_r_t_ckt_opt_1_1off_01_4.html#a3cd70e3b625727748bb8d7d2a9ffe6a4">  109</a></span>&#160;    <a class="code" href="class_hash.html">Hash</a> <a class="code" href="class_half_gate_gen_3_01_t_00_01_r_t_ckt_opt_1_1off_01_4.html#a3cd70e3b625727748bb8d7d2a9ffe6a4">hash</a>;</div><div class="line"><a name="l00110"></a><span class="lineno"><a class="line" href="class_half_gate_gen_3_01_t_00_01_r_t_ckt_opt_1_1off_01_4.html#a301872910c639d55ff55af7a472639af">  110</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="class_half_gate_gen.html#a4125dfe4791aa8d529844c2b2da2df91">with_file_io</a> = <span class="keyword">false</span>;</div><div class="line"><a name="l00111"></a><span class="lineno"><a class="line" href="class_half_gate_gen_3_01_t_00_01_r_t_ckt_opt_1_1off_01_4.html#ae4b92a275de2cc22e94878e0416a2cab">  111</a></span>&#160;    <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> constant[2];</div><div class="line"><a name="l00112"></a><span class="lineno"><a class="line" href="class_half_gate_gen_3_01_t_00_01_r_t_ckt_opt_1_1off_01_4.html#a9dd615ac076ebc914fbe4cedc087813b">  112</a></span>&#160;    <a class="code" href="class_half_gate_gen_3_01_t_00_01_r_t_ckt_opt_1_1off_01_4.html#a9dd615ac076ebc914fbe4cedc087813b">HalfGateGen</a>(T * io) :io(io) {</div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;        <a class="code" href="class_p_r_g.html">PRG</a> tmp;</div><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;        tmp.<a class="code" href="class_p_r_g.html#a822a2e39f1d2629b881ce9b3b8d66bf9">random_block</a>(&amp;seed, 1);</div><div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;        <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> a;</div><div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;        tmp.<a class="code" href="class_p_r_g.html#a822a2e39f1d2629b881ce9b3b8d66bf9">random_block</a>(&amp;a, 1);</div><div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;        <a class="code" href="class_garble_circuit.html#a46e815c9fb7a86bd4f2f92480779a13b">is_public_ptr</a> = &amp;halfgate_gen_is_public&lt;T, RTCktOpt::off&gt;;</div><div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;        <a class="code" href="class_garble_circuit.html#a6615b1040a189cff8e434b9e0aace85b">public_label_ptr</a> = &amp;halfgate_gen_public_label&lt;T, RTCktOpt::off&gt;;</div><div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;        <a class="code" href="class_garble_circuit.html#afccc6540c2627b73b87d6c5f84b88f1e">gc_and_ptr</a> = &amp;halfgate_gen_and&lt;T, RTCktOpt::off&gt;;</div><div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;        <a class="code" href="class_garble_circuit.html#afa9ba1e3231ce457c27271ab0f851014">gc_xor_ptr</a> = &amp;halfgate_gen_xor&lt;T, RTCktOpt::off&gt;;</div><div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;        <a class="code" href="class_garble_circuit.html#a21e46d460e571ba333ad682c92c4bd57">gc_not_ptr</a> = &amp;halfgate_gen_not&lt;T, RTCktOpt::off&gt;;</div><div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;        <a class="code" href="class_half_gate_gen.html#a5cd42ef5182448a5069a3918ff05196f">set_delta</a>(a);</div><div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;    }</div><div class="line"><a name="l00124"></a><span class="lineno"><a class="line" href="class_half_gate_gen_3_01_t_00_01_r_t_ckt_opt_1_1off_01_4.html#aa02fa2884eff682328cca9787a09c26d">  124</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="class_half_gate_gen_3_01_t_00_01_r_t_ckt_opt_1_1off_01_4.html#aa02fa2884eff682328cca9787a09c26d">is_public_impl</a>(<span class="keyword">const</span> <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> &amp; b, <span class="keywordtype">int</span> <a class="code" href="input-check-malicious_8cpp.html#aefdd5aa9f02e7cb8d21ea22b0e6b03df">party</a>) {</div><div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;    }</div><div class="line"><a name="l00127"></a><span class="lineno"><a class="line" href="class_half_gate_gen_3_01_t_00_01_r_t_ckt_opt_1_1off_01_4.html#a29ffb95a58f36afb40649cf37cbf7645">  127</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="class_half_gate_gen_3_01_t_00_01_r_t_ckt_opt_1_1off_01_4.html#a29ffb95a58f36afb40649cf37cbf7645">isDelta</a>(<span class="keyword">const</span> <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> &amp; b) {</div><div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;        __m128i neq = _mm_xor_si128(b, delta);</div><div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;        <span class="keywordflow">return</span> _mm_testz_si128(neq, neq);</div><div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;    }</div><div class="line"><a name="l00131"></a><span class="lineno"><a class="line" href="class_half_gate_gen_3_01_t_00_01_r_t_ckt_opt_1_1off_01_4.html#a5799697b31dba184776a26a92fe86664">  131</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_half_gate_gen_3_01_t_00_01_r_t_ckt_opt_1_1off_01_4.html#a5799697b31dba184776a26a92fe86664">set_delta</a>(<span class="keyword">const</span> <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> &amp;_delta) {</div><div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;        this-&gt;delta = <a class="code" href="class_garble_circuit.html#a86e55a9aa718d272c365dfd649fa97e1">make_delta</a>(_delta);</div><div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;        <a class="code" href="class_p_r_g.html">PRG</a> prg2(<a class="code" href="utils_2block_8h.html#a1a61c940fcdfab9d717ed2f9c27f3602">fix_key</a>);prg2.<a class="code" href="class_p_r_g.html#a822a2e39f1d2629b881ce9b3b8d66bf9">random_block</a>(constant, 2);</div><div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;        constant[1] = <a class="code" href="utils_2block_8h.html#a939b7dd0e7479964d6fe6984b90dd5ce">xorBlocks</a>(constant[1],delta);</div><div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;    }</div><div class="line"><a name="l00136"></a><span class="lineno"><a class="line" href="class_half_gate_gen_3_01_t_00_01_r_t_ckt_opt_1_1off_01_4.html#aa6d1519beefe15445b36a6c46f4f51b4">  136</a></span>&#160;    <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> <a class="code" href="class_half_gate_gen_3_01_t_00_01_r_t_ckt_opt_1_1off_01_4.html#aa6d1519beefe15445b36a6c46f4f51b4">public_label_impl</a>(<span class="keywordtype">bool</span> b) {</div><div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;        <span class="keywordflow">return</span> constant[b];</div><div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;    }</div><div class="line"><a name="l00139"></a><span class="lineno"><a class="line" href="class_half_gate_gen_3_01_t_00_01_r_t_ckt_opt_1_1off_01_4.html#aa854180e3f909549129f0f8058614201">  139</a></span>&#160;    <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> <a class="code" href="class_half_gate_gen_3_01_t_00_01_r_t_ckt_opt_1_1off_01_4.html#aa854180e3f909549129f0f8058614201">gen_and</a>(<span class="keyword">const</span> <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a>&amp; a, <span class="keyword">const</span> <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a>&amp; b) {</div><div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;        <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> out[2], table[2];</div><div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;        garble_gate_garble_halfgates(<a class="code" href="garble_8h.html#acde351ee0c4a231557cb9d0b8b7a2641aa6a6bdaab4cbde5d9524a39cac9f3bfa">GARBLE_GATE_AND</a>, a, <a class="code" href="utils_2block_8h.html#a939b7dd0e7479964d6fe6984b90dd5ce">xorBlocks</a>(a,delta), b, <a class="code" href="utils_2block_8h.html#a939b7dd0e7479964d6fe6984b90dd5ce">xorBlocks</a>(b,delta), </div><div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;                &amp;out[0], &amp;out[1], delta, table, <a class="code" href="class_garble_circuit.html#a8f6b42bac3b5ce931d1d3eacb7db9d88">gid</a>++, prp.<a class="code" href="class_p_r_p.html#abbb7cb3f37a26e14c411c83d9ad4cc92">aes</a>);</div><div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;        io-&gt;send_block(table, 2);</div><div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;        <span class="keywordflow">return</span> out[0];</div><div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;    }</div><div class="line"><a name="l00146"></a><span class="lineno"><a class="line" href="class_half_gate_gen_3_01_t_00_01_r_t_ckt_opt_1_1off_01_4.html#a03f67e2ab9066ba19e65be264f5624c5">  146</a></span>&#160;    <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> <a class="code" href="class_half_gate_gen_3_01_t_00_01_r_t_ckt_opt_1_1off_01_4.html#a03f67e2ab9066ba19e65be264f5624c5">gen_xor</a>(<span class="keyword">const</span> <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a>&amp;a, <span class="keyword">const</span> <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a>&amp; b) {</div><div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="utils_2block_8h.html#a939b7dd0e7479964d6fe6984b90dd5ce">xorBlocks</a>(a, b);</div><div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;    }</div><div class="line"><a name="l00149"></a><span class="lineno"><a class="line" href="class_half_gate_gen_3_01_t_00_01_r_t_ckt_opt_1_1off_01_4.html#a250dcfdb2970b0ee4b0fe45af0d765d3">  149</a></span>&#160;    <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> <a class="code" href="class_half_gate_gen_3_01_t_00_01_r_t_ckt_opt_1_1off_01_4.html#a250dcfdb2970b0ee4b0fe45af0d765d3">gen_not</a>(<span class="keyword">const</span> <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a>&amp;a) {</div><div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="class_half_gate_gen.html#a1f33c3c22bc8ef11077a8d2c04820973">gen_xor</a>(a, <a class="code" href="class_half_gate_gen.html#a304b0a60a2adc9ea36ea34c45eb1fac9">public_label_impl</a>(<span class="keyword">true</span>));</div><div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;    }</div><div class="line"><a name="l00152"></a><span class="lineno"><a class="line" href="class_half_gate_gen_3_01_t_00_01_r_t_ckt_opt_1_1off_01_4.html#af4ec5512ae26d607cf8ffc83ac9687a9">  152</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_half_gate_gen_3_01_t_00_01_r_t_ckt_opt_1_1off_01_4.html#af4ec5512ae26d607cf8ffc83ac9687a9">generic_to_xor</a>(<span class="keyword">const</span> <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a>* new_b0,<span class="keyword">const</span> <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> * b0, <span class="keyword">const</span> <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> * b1, <span class="keywordtype">int</span> length) {</div><div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;        <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> h[4];</div><div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;        <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i = 0; i &lt; length; ++i) {</div><div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;            h[0] = prp.<a class="code" href="class_p_r_p.html#a27497c4db9526ca6a8df4fd4db9782d0">H</a>(b0[i], 2*i);</div><div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;            h[1] = prp.<a class="code" href="class_p_r_p.html#a27497c4db9526ca6a8df4fd4db9782d0">H</a>(b0[i], 2*i+1);</div><div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;            h[2] = prp.<a class="code" href="class_p_r_p.html#a27497c4db9526ca6a8df4fd4db9782d0">H</a>(b1[i], 2*i);</div><div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;            h[3] = prp.<a class="code" href="class_p_r_p.html#a27497c4db9526ca6a8df4fd4db9782d0">H</a>(b1[i], 2*i+1);</div><div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;</div><div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;            h[1] = <a class="code" href="utils_2block_8h.html#a939b7dd0e7479964d6fe6984b90dd5ce">xorBlocks</a>(new_b0[i], h[1]);  </div><div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;            h[3] = <a class="code" href="utils_2block_8h.html#a939b7dd0e7479964d6fe6984b90dd5ce">xorBlocks</a>(new_b0[i], h[3]);  </div><div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;            h[3] = <a class="code" href="utils_2block_8h.html#a939b7dd0e7479964d6fe6984b90dd5ce">xorBlocks</a>(delta, h[3]);</div><div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;            io-&gt;send_block(h, 4);</div><div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;        }</div><div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;    }</div><div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;};</div><div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;</div><div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> T, RTCktOpt rt&gt;</div><div class="line"><a name="l00169"></a><span class="lineno"><a class="line" href="halfgate__gen_8h.html#a661cb24690d1d5e7626a9d7373e2ea52">  169</a></span>&#160;<span class="keywordtype">bool</span> <a class="code" href="halfgate__gen_8h.html#a661cb24690d1d5e7626a9d7373e2ea52">halfgate_gen_is_public</a>(<a class="code" href="class_garble_circuit.html">GarbleCircuit</a>* gc, <span class="keyword">const</span> <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> &amp; b, <span class="keywordtype">int</span> <a class="code" href="input-check-malicious_8cpp.html#aefdd5aa9f02e7cb8d21ea22b0e6b03df">party</a>) {</div><div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;    <span class="keywordflow">return</span> ((<a class="code" href="class_half_gate_gen.html">HalfGateGen&lt;T, rt&gt;</a>*)gc)-&gt;is_public_impl(b, party);</div><div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;}</div><div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> T, RTCktOpt rt&gt;</div><div class="line"><a name="l00173"></a><span class="lineno"><a class="line" href="halfgate__gen_8h.html#ae2ae2f78c5d648c19a7ead8c9eb3440c">  173</a></span>&#160;<a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> <a class="code" href="halfgate__gen_8h.html#ae2ae2f78c5d648c19a7ead8c9eb3440c">halfgate_gen_public_label</a>(<a class="code" href="class_garble_circuit.html">GarbleCircuit</a>* gc, <span class="keywordtype">bool</span> b) {</div><div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;    <span class="keywordflow">return</span> ((<a class="code" href="class_half_gate_gen.html">HalfGateGen&lt;T,rt&gt;</a>*)gc)-&gt;public_label_impl(b);</div><div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;}</div><div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> T, RTCktOpt rt&gt;</div><div class="line"><a name="l00177"></a><span class="lineno"><a class="line" href="halfgate__gen_8h.html#a3b19931586747a65d007ff4877157f26">  177</a></span>&#160;<a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> <a class="code" href="halfgate__gen_8h.html#a3b19931586747a65d007ff4877157f26">halfgate_gen_and</a>(<a class="code" href="class_garble_circuit.html">GarbleCircuit</a>* gc, <span class="keyword">const</span> <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a>&amp;a, <span class="keyword">const</span> <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a>&amp;b) {</div><div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;    <span class="keywordflow">return</span> ((<a class="code" href="class_half_gate_gen.html">HalfGateGen&lt;T,rt&gt;</a>*)gc)-&gt;gen_and(a, b);</div><div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;}</div><div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> T, RTCktOpt rt&gt;</div><div class="line"><a name="l00181"></a><span class="lineno"><a class="line" href="halfgate__gen_8h.html#acda380ac711489ae48d276513088968c">  181</a></span>&#160;<a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> <a class="code" href="halfgate__gen_8h.html#acda380ac711489ae48d276513088968c">halfgate_gen_xor</a>(<a class="code" href="class_garble_circuit.html">GarbleCircuit</a>*gc, <span class="keyword">const</span> <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a>&amp;a, <span class="keyword">const</span> <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a>&amp;b) {</div><div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;    <span class="keywordflow">return</span> ((<a class="code" href="class_half_gate_gen.html">HalfGateGen&lt;T, rt&gt;</a>*)gc)-&gt;gen_xor(a, b);</div><div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;}</div><div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> T, RTCktOpt rt&gt;</div><div class="line"><a name="l00185"></a><span class="lineno"><a class="line" href="halfgate__gen_8h.html#aa04db20be652be74ba88238a7321e56e">  185</a></span>&#160;<a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> <a class="code" href="halfgate__gen_8h.html#aa04db20be652be74ba88238a7321e56e">halfgate_gen_not</a>(<a class="code" href="class_garble_circuit.html">GarbleCircuit</a>*gc, <span class="keyword">const</span> <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a>&amp;a) {</div><div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;    <span class="keywordflow">return</span> ((<a class="code" href="class_half_gate_gen.html">HalfGateGen&lt;T, rt&gt;</a>*)gc)-&gt;gen_not(a);</div><div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;}</div><div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;</div><div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;<span class="preprocessor">#endif// HALFGATE_GEN_H__</span></div><div class="ttc" id="class_garble_circuit_html_a86e55a9aa718d272c365dfd649fa97e1"><div class="ttname"><a href="class_garble_circuit.html#a86e55a9aa718d272c365dfd649fa97e1">GarbleCircuit::make_delta</a></div><div class="ttdeci">static block make_delta(const block &amp;a)</div><div class="ttdef"><b>Definition:</b> garble_circuit.h:30</div></div>
<div class="ttc" id="class_half_gate_gen_3_01_t_00_01_r_t_ckt_opt_1_1off_01_4_html_aa4f32a1fbbe98f879630d094d414259b"><div class="ttname"><a href="class_half_gate_gen_3_01_t_00_01_r_t_ckt_opt_1_1off_01_4.html#aa4f32a1fbbe98f879630d094d414259b">HalfGateGen&lt; T, RTCktOpt::off &gt;::delta</a></div><div class="ttdeci">block delta</div><div class="ttdef"><b>Definition:</b> halfgate_gen.h:105</div></div>
<div class="ttc" id="halfgate__gen_8h_html_a661cb24690d1d5e7626a9d7373e2ea52"><div class="ttname"><a href="halfgate__gen_8h.html#a661cb24690d1d5e7626a9d7373e2ea52">halfgate_gen_is_public</a></div><div class="ttdeci">bool halfgate_gen_is_public(GarbleCircuit *gc, const block &amp;b, int party)</div><div class="ttdef"><b>Definition:</b> halfgate_gen.h:169</div></div>
<div class="ttc" id="class_half_gate_gen_html_ae15a690cbd5d499e56c6a3ec4b97e8c9"><div class="ttname"><a href="class_half_gate_gen.html#ae15a690cbd5d499e56c6a3ec4b97e8c9">HalfGateGen::HalfGateGen</a></div><div class="ttdeci">HalfGateGen(T *io)</div><div class="ttdef"><b>Definition:</b> halfgate_gen.h:36</div></div>
<div class="ttc" id="io__channel_8h_html"><div class="ttname"><a href="io__channel_8h.html">io_channel.h</a></div></div>
<div class="ttc" id="halfgate__gen_8h_html_a3b19931586747a65d007ff4877157f26"><div class="ttname"><a href="halfgate__gen_8h.html#a3b19931586747a65d007ff4877157f26">halfgate_gen_and</a></div><div class="ttdeci">block halfgate_gen_and(GarbleCircuit *gc, const block &amp;a, const block &amp;b)</div><div class="ttdef"><b>Definition:</b> halfgate_gen.h:177</div></div>
<div class="ttc" id="garble_2block_8h_html_a65abbf31b0a30290189cdb5059b5f785"><div class="ttname"><a href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a></div><div class="ttdeci">__m128i block</div><div class="ttdef"><b>Definition:</b> block.h:8</div></div>
<div class="ttc" id="utils_2block_8h_html_a5d6a5bd7b77a4610c6158487adbe5ba4"><div class="ttname"><a href="utils_2block_8h.html#a5d6a5bd7b77a4610c6158487adbe5ba4">isZero</a></div><div class="ttdeci">bool isZero(const block *b)</div><div class="ttdef"><b>Definition:</b> block.h:71</div></div>
<div class="ttc" id="prp_8h_html"><div class="ttname"><a href="prp_8h.html">prp.h</a></div></div>
<div class="ttc" id="class_half_gate_gen_3_01_t_00_01_r_t_ckt_opt_1_1off_01_4_html_a05602f4b1690ebdcd3337f4c516376d4"><div class="ttname"><a href="class_half_gate_gen_3_01_t_00_01_r_t_ckt_opt_1_1off_01_4.html#a05602f4b1690ebdcd3337f4c516376d4">HalfGateGen&lt; T, RTCktOpt::off &gt;::io</a></div><div class="ttdeci">T * io</div><div class="ttdef"><b>Definition:</b> halfgate_gen.h:108</div></div>
<div class="ttc" id="class_half_gate_gen_html_a4125dfe4791aa8d529844c2b2da2df91"><div class="ttname"><a href="class_half_gate_gen.html#a4125dfe4791aa8d529844c2b2da2df91">HalfGateGen::with_file_io</a></div><div class="ttdeci">bool with_file_io</div><div class="ttdef"><b>Definition:</b> halfgate_gen.h:35</div></div>
<div class="ttc" id="class_half_gate_gen_html_af60f59213128225ff61b320b76eb35ef"><div class="ttname"><a href="class_half_gate_gen.html#af60f59213128225ff61b320b76eb35ef">HalfGateGen::hash</a></div><div class="ttdeci">Hash hash</div><div class="ttdef"><b>Definition:</b> halfgate_gen.h:34</div></div>
<div class="ttc" id="class_garble_circuit_html_a8f6b42bac3b5ce931d1d3eacb7db9d88"><div class="ttname"><a href="class_garble_circuit.html#a8f6b42bac3b5ce931d1d3eacb7db9d88">GarbleCircuit::gid</a></div><div class="ttdeci">uint64_t gid</div><div class="ttdef"><b>Definition:</b> garble_circuit.h:8</div></div>
<div class="ttc" id="utils_2block_8h_html_a939b7dd0e7479964d6fe6984b90dd5ce"><div class="ttname"><a href="utils_2block_8h.html#a939b7dd0e7479964d6fe6984b90dd5ce">xorBlocks</a></div><div class="ttdeci">block xorBlocks(block x, block y)</div><div class="ttdef"><b>Definition:</b> block.h:35</div></div>
<div class="ttc" id="hash_8h_html"><div class="ttname"><a href="hash_8h.html">hash.h</a></div></div>
<div class="ttc" id="class_half_gate_gen_html_a304b0a60a2adc9ea36ea34c45eb1fac9"><div class="ttname"><a href="class_half_gate_gen.html#a304b0a60a2adc9ea36ea34c45eb1fac9">HalfGateGen::public_label_impl</a></div><div class="ttdeci">block public_label_impl(bool b)</div><div class="ttdef"><b>Definition:</b> halfgate_gen.h:54</div></div>
<div class="ttc" id="utils_2block_8h_html_a01d7fb04c12a2a0e2e30c31e0c61d44d"><div class="ttname"><a href="utils_2block_8h.html#a01d7fb04c12a2a0e2e30c31e0c61d44d">isOne</a></div><div class="ttdeci">bool isOne(const block *b)</div><div class="ttdef"><b>Definition:</b> block.h:75</div></div>
<div class="ttc" id="class_garble_circuit_html_afccc6540c2627b73b87d6c5f84b88f1e"><div class="ttname"><a href="class_garble_circuit.html#afccc6540c2627b73b87d6c5f84b88f1e">GarbleCircuit::gc_and_ptr</a></div><div class="ttdeci">block(* gc_and_ptr)(GarbleCircuit *gc, const block &amp;a, const block &amp;b)</div><div class="ttdef"><b>Definition:</b> garble_circuit.h:11</div></div>
<div class="ttc" id="class_half_gate_gen_3_01_t_00_01_r_t_ckt_opt_1_1off_01_4_html_a9dd615ac076ebc914fbe4cedc087813b"><div class="ttname"><a href="class_half_gate_gen_3_01_t_00_01_r_t_ckt_opt_1_1off_01_4.html#a9dd615ac076ebc914fbe4cedc087813b">HalfGateGen&lt; T, RTCktOpt::off &gt;::HalfGateGen</a></div><div class="ttdeci">HalfGateGen(T *io)</div><div class="ttdef"><b>Definition:</b> halfgate_gen.h:112</div></div>
<div class="ttc" id="class_half_gate_gen_3_01_t_00_01_r_t_ckt_opt_1_1off_01_4_html_a5799697b31dba184776a26a92fe86664"><div class="ttname"><a href="class_half_gate_gen_3_01_t_00_01_r_t_ckt_opt_1_1off_01_4.html#a5799697b31dba184776a26a92fe86664">HalfGateGen&lt; T, RTCktOpt::off &gt;::set_delta</a></div><div class="ttdeci">void set_delta(const block &amp;_delta)</div><div class="ttdef"><b>Definition:</b> halfgate_gen.h:131</div></div>
<div class="ttc" id="class_half_gate_gen_html_adca6116d57d56939511f22bb810d512f"><div class="ttname"><a href="class_half_gate_gen.html#adca6116d57d56939511f22bb810d512f">HalfGateGen::is_public_impl</a></div><div class="ttdeci">bool is_public_impl(const block &amp;b, int party)</div><div class="ttdef"><b>Definition:</b> halfgate_gen.h:48</div></div>
<div class="ttc" id="utils_2block_8h_html_af2ad8a9f0015464df6574a13e598bdb8"><div class="ttname"><a href="utils_2block_8h.html#af2ad8a9f0015464df6574a13e598bdb8">zero_block</a></div><div class="ttdeci">#define zero_block()</div><div class="ttdef"><b>Definition:</b> block.h:66</div></div>
<div class="ttc" id="class_garble_circuit_html_a6615b1040a189cff8e434b9e0aace85b"><div class="ttname"><a href="class_garble_circuit.html#a6615b1040a189cff8e434b9e0aace85b">GarbleCircuit::public_label_ptr</a></div><div class="ttdeci">block(* public_label_ptr)(GarbleCircuit *gc, bool b)</div><div class="ttdef"><b>Definition:</b> garble_circuit.h:10</div></div>
<div class="ttc" id="garble__circuit_8h_html_ae7d6f2e6bfde733807facd102cf377fe"><div class="ttname"><a href="garble__circuit_8h.html#ae7d6f2e6bfde733807facd102cf377fe">RTCktOpt</a></div><div class="ttdeci">RTCktOpt</div><div class="ttdef"><b>Definition:</b> garble_circuit.h:6</div></div>
<div class="ttc" id="utils_8h_html"><div class="ttname"><a href="utils_8h.html">utils.h</a></div></div>
<div class="ttc" id="class_half_gate_gen_html_a1f33c3c22bc8ef11077a8d2c04820973"><div class="ttname"><a href="class_half_gate_gen.html#a1f33c3c22bc8ef11077a8d2c04820973">HalfGateGen::gen_xor</a></div><div class="ttdeci">block gen_xor(const block &amp;a, const block &amp;b)</div><div class="ttdef"><b>Definition:</b> halfgate_gen.h:72</div></div>
<div class="ttc" id="halfgate__gen_8h_html_acda380ac711489ae48d276513088968c"><div class="ttname"><a href="halfgate__gen_8h.html#acda380ac711489ae48d276513088968c">halfgate_gen_xor</a></div><div class="ttdeci">block halfgate_gen_xor(GarbleCircuit *gc, const block &amp;a, const block &amp;b)</div><div class="ttdef"><b>Definition:</b> halfgate_gen.h:181</div></div>
<div class="ttc" id="class_half_gate_gen_html_a463724b03a248df355c58acd0c8e3dca"><div class="ttname"><a href="class_half_gate_gen.html#a463724b03a248df355c58acd0c8e3dca">HalfGateGen::io</a></div><div class="ttdeci">T * io</div><div class="ttdef"><b>Definition:</b> halfgate_gen.h:33</div></div>
<div class="ttc" id="class_half_gate_gen_3_01_t_00_01_r_t_ckt_opt_1_1off_01_4_html_a29ffb95a58f36afb40649cf37cbf7645"><div class="ttname"><a href="class_half_gate_gen_3_01_t_00_01_r_t_ckt_opt_1_1off_01_4.html#a29ffb95a58f36afb40649cf37cbf7645">HalfGateGen&lt; T, RTCktOpt::off &gt;::isDelta</a></div><div class="ttdeci">bool isDelta(const block &amp;b)</div><div class="ttdef"><b>Definition:</b> halfgate_gen.h:127</div></div>
<div class="ttc" id="class_half_gate_gen_html_a51a319ae4aad029e54743856abaf8856"><div class="ttname"><a href="class_half_gate_gen.html#a51a319ae4aad029e54743856abaf8856">HalfGateGen::generic_to_xor</a></div><div class="ttdeci">void generic_to_xor(const block *new_b0, const block *b0, const block *b1, int length)</div><div class="ttdef"><b>Definition:</b> halfgate_gen.h:88</div></div>
<div class="ttc" id="garble_8h_html_acde351ee0c4a231557cb9d0b8b7a2641aa6a6bdaab4cbde5d9524a39cac9f3bfa"><div class="ttname"><a href="garble_8h.html#acde351ee0c4a231557cb9d0b8b7a2641aa6a6bdaab4cbde5d9524a39cac9f3bfa">GARBLE_GATE_AND</a></div><div class="ttdef"><b>Definition:</b> garble.h:28</div></div>
<div class="ttc" id="class_p_r_g_html_a822a2e39f1d2629b881ce9b3b8d66bf9"><div class="ttname"><a href="class_p_r_g.html#a822a2e39f1d2629b881ce9b3b8d66bf9">PRG::random_block</a></div><div class="ttdeci">void random_block(block *data, int nblocks=1)</div><div class="ttdef"><b>Definition:</b> prg.h:75</div></div>
<div class="ttc" id="utils_2block_8h_html_a1a61c940fcdfab9d717ed2f9c27f3602"><div class="ttname"><a href="utils_2block_8h.html#a1a61c940fcdfab9d717ed2f9c27f3602">fix_key</a></div><div class="ttdeci">const char fix_key[]</div><div class="ttdef"><b>Definition:</b> block.h:130</div></div>
<div class="ttc" id="garble__circuit_8h_html_ae7d6f2e6bfde733807facd102cf377fea53ace14c115e45153a1c9105accceb4c"><div class="ttname"><a href="garble__circuit_8h.html#ae7d6f2e6bfde733807facd102cf377fea53ace14c115e45153a1c9105accceb4c">off</a></div><div class="ttdef"><b>Definition:</b> garble_circuit.h:6</div></div>
<div class="ttc" id="class_p_r_p_html_a27497c4db9526ca6a8df4fd4db9782d0"><div class="ttname"><a href="class_p_r_p.html#a27497c4db9526ca6a8df4fd4db9782d0">PRP::H</a></div><div class="ttdeci">block H(block in, uint64_t id)</div><div class="ttdef"><b>Definition:</b> prp.h:48</div></div>
<div class="ttc" id="class_p_r_p_html"><div class="ttname"><a href="class_p_r_p.html">PRP</a></div><div class="ttdef"><b>Definition:</b> prp.h:11</div></div>
<div class="ttc" id="net__io__channel_8h_html"><div class="ttname"><a href="net__io__channel_8h.html">net_io_channel.h</a></div></div>
<div class="ttc" id="class_p_r_p_html_abbb7cb3f37a26e14c411c83d9ad4cc92"><div class="ttname"><a href="class_p_r_p.html#abbb7cb3f37a26e14c411c83d9ad4cc92">PRP::aes</a></div><div class="ttdeci">AES_KEY * aes</div><div class="ttdef"><b>Definition:</b> prp.h:12</div></div>
<div class="ttc" id="class_garble_circuit_html_a21e46d460e571ba333ad682c92c4bd57"><div class="ttname"><a href="class_garble_circuit.html#a21e46d460e571ba333ad682c92c4bd57">GarbleCircuit::gc_not_ptr</a></div><div class="ttdeci">block(* gc_not_ptr)(GarbleCircuit *gc, const block &amp;a)</div><div class="ttdef"><b>Definition:</b> garble_circuit.h:13</div></div>
<div class="ttc" id="class_half_gate_gen_3_01_t_00_01_r_t_ckt_opt_1_1off_01_4_html_a3cd70e3b625727748bb8d7d2a9ffe6a4"><div class="ttname"><a href="class_half_gate_gen_3_01_t_00_01_r_t_ckt_opt_1_1off_01_4.html#a3cd70e3b625727748bb8d7d2a9ffe6a4">HalfGateGen&lt; T, RTCktOpt::off &gt;::hash</a></div><div class="ttdeci">Hash hash</div><div class="ttdef"><b>Definition:</b> halfgate_gen.h:109</div></div>
<div class="ttc" id="class_half_gate_gen_3_01_t_00_01_r_t_ckt_opt_1_1off_01_4_html_a250dcfdb2970b0ee4b0fe45af0d765d3"><div class="ttname"><a href="class_half_gate_gen_3_01_t_00_01_r_t_ckt_opt_1_1off_01_4.html#a250dcfdb2970b0ee4b0fe45af0d765d3">HalfGateGen&lt; T, RTCktOpt::off &gt;::gen_not</a></div><div class="ttdeci">block gen_not(const block &amp;a)</div><div class="ttdef"><b>Definition:</b> halfgate_gen.h:149</div></div>
<div class="ttc" id="class_garble_circuit_html_afa9ba1e3231ce457c27271ab0f851014"><div class="ttname"><a href="class_garble_circuit.html#afa9ba1e3231ce457c27271ab0f851014">GarbleCircuit::gc_xor_ptr</a></div><div class="ttdeci">block(* gc_xor_ptr)(GarbleCircuit *gc, const block &amp;a, const block &amp;b)</div><div class="ttdef"><b>Definition:</b> garble_circuit.h:12</div></div>
<div class="ttc" id="class_half_gate_gen_html_a4461a70b2d3763dc46a1e59f5316f6cf"><div class="ttname"><a href="class_half_gate_gen.html#a4461a70b2d3763dc46a1e59f5316f6cf">HalfGateGen::delta</a></div><div class="ttdeci">block delta</div><div class="ttdef"><b>Definition:</b> halfgate_gen.h:30</div></div>
<div class="ttc" id="class_half_gate_gen_html_ab318af2fe80af274c87ad15d510ebdfe"><div class="ttname"><a href="class_half_gate_gen.html#ab318af2fe80af274c87ad15d510ebdfe">HalfGateGen::gen_not</a></div><div class="ttdeci">block gen_not(const block &amp;a)</div><div class="ttdef"><b>Definition:</b> halfgate_gen.h:80</div></div>
<div class="ttc" id="garble__gate__halfgates_8h_html"><div class="ttname"><a href="garble__gate__halfgates_8h.html">garble_gate_halfgates.h</a></div></div>
<div class="ttc" id="class_half_gate_gen_3_01_t_00_01_r_t_ckt_opt_1_1off_01_4_html_aa6d1519beefe15445b36a6c46f4f51b4"><div class="ttname"><a href="class_half_gate_gen_3_01_t_00_01_r_t_ckt_opt_1_1off_01_4.html#aa6d1519beefe15445b36a6c46f4f51b4">HalfGateGen&lt; T, RTCktOpt::off &gt;::public_label_impl</a></div><div class="ttdeci">block public_label_impl(bool b)</div><div class="ttdef"><b>Definition:</b> halfgate_gen.h:136</div></div>
<div class="ttc" id="class_p_r_g_html"><div class="ttname"><a href="class_p_r_g.html">PRG</a></div><div class="ttdef"><b>Definition:</b> prg.h:16</div></div>
<div class="ttc" id="file__io__channel_8h_html"><div class="ttname"><a href="file__io__channel_8h.html">file_io_channel.h</a></div></div>
<div class="ttc" id="class_half_gate_gen_3_01_t_00_01_r_t_ckt_opt_1_1off_01_4_html_aa02fa2884eff682328cca9787a09c26d"><div class="ttname"><a href="class_half_gate_gen_3_01_t_00_01_r_t_ckt_opt_1_1off_01_4.html#aa02fa2884eff682328cca9787a09c26d">HalfGateGen&lt; T, RTCktOpt::off &gt;::is_public_impl</a></div><div class="ttdeci">bool is_public_impl(const block &amp;b, int party)</div><div class="ttdef"><b>Definition:</b> halfgate_gen.h:124</div></div>
<div class="ttc" id="class_hash_html"><div class="ttname"><a href="class_hash.html">Hash</a></div><div class="ttdef"><b>Definition:</b> hash.h:12</div></div>
<div class="ttc" id="halfgate__gen_8h_html_aa04db20be652be74ba88238a7321e56e"><div class="ttname"><a href="halfgate__gen_8h.html#aa04db20be652be74ba88238a7321e56e">halfgate_gen_not</a></div><div class="ttdeci">block halfgate_gen_not(GarbleCircuit *gc, const block &amp;a)</div><div class="ttdef"><b>Definition:</b> halfgate_gen.h:185</div></div>
<div class="ttc" id="class_half_gate_gen_html_a4dd6b3c5b9ccc71f9b92eeba484a66dc"><div class="ttname"><a href="class_half_gate_gen.html#a4dd6b3c5b9ccc71f9b92eeba484a66dc">HalfGateGen::prp</a></div><div class="ttdeci">PRP prp</div><div class="ttdef"><b>Definition:</b> halfgate_gen.h:31</div></div>
<div class="ttc" id="class_half_gate_gen_3_01_t_00_01_r_t_ckt_opt_1_1off_01_4_html_af4ec5512ae26d607cf8ffc83ac9687a9"><div class="ttname"><a href="class_half_gate_gen_3_01_t_00_01_r_t_ckt_opt_1_1off_01_4.html#af4ec5512ae26d607cf8ffc83ac9687a9">HalfGateGen&lt; T, RTCktOpt::off &gt;::generic_to_xor</a></div><div class="ttdeci">void generic_to_xor(const block *new_b0, const block *b0, const block *b1, int length)</div><div class="ttdef"><b>Definition:</b> halfgate_gen.h:152</div></div>
<div class="ttc" id="utils_2block_8h_html_a82cb0a8d42708a807a061856813ac9f6"><div class="ttname"><a href="utils_2block_8h.html#a82cb0a8d42708a807a061856813ac9f6">one_block</a></div><div class="ttdeci">#define one_block()</div><div class="ttdef"><b>Definition:</b> block.h:67</div></div>
<div class="ttc" id="class_half_gate_gen_3_01_t_00_01_r_t_ckt_opt_1_1off_01_4_html_a2630761bc053b3f9ad04eefb122c25fb"><div class="ttname"><a href="class_half_gate_gen_3_01_t_00_01_r_t_ckt_opt_1_1off_01_4.html#a2630761bc053b3f9ad04eefb122c25fb">HalfGateGen&lt; T, RTCktOpt::off &gt;::seed</a></div><div class="ttdeci">block seed</div><div class="ttdef"><b>Definition:</b> halfgate_gen.h:107</div></div>
<div class="ttc" id="class_garble_circuit_html"><div class="ttname"><a href="class_garble_circuit.html">GarbleCircuit</a></div><div class="ttdef"><b>Definition:</b> garble_circuit.h:7</div></div>
<div class="ttc" id="class_half_gate_gen_3_01_t_00_01_r_t_ckt_opt_1_1off_01_4_html_aa854180e3f909549129f0f8058614201"><div class="ttname"><a href="class_half_gate_gen_3_01_t_00_01_r_t_ckt_opt_1_1off_01_4.html#aa854180e3f909549129f0f8058614201">HalfGateGen&lt; T, RTCktOpt::off &gt;::gen_and</a></div><div class="ttdeci">block gen_and(const block &amp;a, const block &amp;b)</div><div class="ttdef"><b>Definition:</b> halfgate_gen.h:139</div></div>
<div class="ttc" id="class_garble_circuit_html_a46e815c9fb7a86bd4f2f92480779a13b"><div class="ttname"><a href="class_garble_circuit.html#a46e815c9fb7a86bd4f2f92480779a13b">GarbleCircuit::is_public_ptr</a></div><div class="ttdeci">bool(* is_public_ptr)(GarbleCircuit *gc, const block &amp;b, int party)</div><div class="ttdef"><b>Definition:</b> garble_circuit.h:9</div></div>
<div class="ttc" id="halfgate__gen_8h_html_ae2ae2f78c5d648c19a7ead8c9eb3440c"><div class="ttname"><a href="halfgate__gen_8h.html#ae2ae2f78c5d648c19a7ead8c9eb3440c">halfgate_gen_public_label</a></div><div class="ttdeci">block halfgate_gen_public_label(GarbleCircuit *gc, bool b)</div><div class="ttdef"><b>Definition:</b> halfgate_gen.h:173</div></div>
<div class="ttc" id="class_half_gate_gen_html"><div class="ttname"><a href="class_half_gate_gen.html">HalfGateGen</a></div><div class="ttdef"><b>Definition:</b> halfgate_gen.h:29</div></div>
<div class="ttc" id="input-check-malicious_8cpp_html_aefdd5aa9f02e7cb8d21ea22b0e6b03df"><div class="ttname"><a href="input-check-malicious_8cpp.html#aefdd5aa9f02e7cb8d21ea22b0e6b03df">party</a></div><div class="ttdeci">int party</div><div class="ttdef"><b>Definition:</b> input-check-malicious.cpp:12</div></div>
<div class="ttc" id="class_half_gate_gen_html_a844d111523a5a413279f08fe508b0a73"><div class="ttname"><a href="class_half_gate_gen.html#a844d111523a5a413279f08fe508b0a73">HalfGateGen::gen_and</a></div><div class="ttdeci">block gen_and(const block &amp;a, const block &amp;b)</div><div class="ttdef"><b>Definition:</b> halfgate_gen.h:57</div></div>
<div class="ttc" id="class_half_gate_gen_3_01_t_00_01_r_t_ckt_opt_1_1off_01_4_html_a03f67e2ab9066ba19e65be264f5624c5"><div class="ttname"><a href="class_half_gate_gen_3_01_t_00_01_r_t_ckt_opt_1_1off_01_4.html#a03f67e2ab9066ba19e65be264f5624c5">HalfGateGen&lt; T, RTCktOpt::off &gt;::gen_xor</a></div><div class="ttdeci">block gen_xor(const block &amp;a, const block &amp;b)</div><div class="ttdef"><b>Definition:</b> halfgate_gen.h:146</div></div>
<div class="ttc" id="class_half_gate_gen_html_a3efbfe69bfecb0a83b27fb1a761f6ca3"><div class="ttname"><a href="class_half_gate_gen.html#a3efbfe69bfecb0a83b27fb1a761f6ca3">HalfGateGen::seed</a></div><div class="ttdeci">block seed</div><div class="ttdef"><b>Definition:</b> halfgate_gen.h:32</div></div>
<div class="ttc" id="class_half_gate_gen_html_a5cd42ef5182448a5069a3918ff05196f"><div class="ttname"><a href="class_half_gate_gen.html#a5cd42ef5182448a5069a3918ff05196f">HalfGateGen::set_delta</a></div><div class="ttdeci">void set_delta(const block &amp;_delta)</div><div class="ttdef"><b>Definition:</b> halfgate_gen.h:51</div></div>
<div class="ttc" id="class_half_gate_gen_3_01_t_00_01_r_t_ckt_opt_1_1off_01_4_html_a39b79c33fd571e8b68f88d422dcdd64e"><div class="ttname"><a href="class_half_gate_gen_3_01_t_00_01_r_t_ckt_opt_1_1off_01_4.html#a39b79c33fd571e8b68f88d422dcdd64e">HalfGateGen&lt; T, RTCktOpt::off &gt;::prp</a></div><div class="ttdeci">PRP prp</div><div class="ttdef"><b>Definition:</b> halfgate_gen.h:106</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_eec959d81771dc8b1a750b834e1341eb.html">emp-tool</a></li><li class="navelem"><a class="el" href="dir_753dd0b08657245813d151abe49cc74f.html">gc</a></li><li class="navelem"><a class="el" href="halfgate__gen_8h.html">halfgate_gen.h</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.12 </li>
  </ul>
</div>
</body>
</html>
